package com.example.weblending.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName file
 */
@TableName(value ="file")
@Data
public class File implements Serializable {
    /**
     * 
     */
    @TableId(value = "fid", type = IdType.AUTO)
    private int fid;

    /**
     * 
     */
    @TableField(value = "uid")
    private Integer uid;

    /**
     * 文件名称

     */
    @TableField(value = "name")
    private String name;

    /**
     * 
     */
    @TableField(value = "path")
    private String path;

    /**
     * 上传时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 分析时间
     */
    @TableField(value = "analyze_time")
    private Date analyzeTime;

    /**
     * 删除时间
     */
    @TableField(value = "delete_time")
    private Date deleteTime;

    /**
     * 状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 清洗时间
     */
    @TableField(value = "clean_time")
    private Date cleanTime;

    /**
     * 
     */
    @TableField(value = "operate_time")
    private Date operateTime;

    /**
     * 
     */
    @TableField(value = "cleanPath")
    private String cleanpath;

    /**
     * 
     */
    @TableField(value = "finishPath")
    private String finishpath;

    /**
     * 
     */
    @TableField(value = "task")
    private Integer task;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public static File save(int uid,String name,String path){
        File file=new File();
        file.name=name;
        file.createTime=new Timestamp(System.currentTimeMillis());
        file.status=0;
        file.uid=uid;
        file.path=path;
        return file;
    }
}